package com.itheima.d1_file;

import java.io.File;
import java.io.IOException;
import java.util.Arrays;

public class FileTest4 {
    public static void main(String[] args) throws IOException {

        File f1 =new File("D:\\大学");
        String[] names =f1.list();
        for (String name : names) {
            System.out.println(name);
        }

        File[] files =f1.listFiles();
        for (File file : files) {
            System.out.println(file.getAbsoluteFile());
        }

        File f =new File("D:/resourse/aaa");
        File[] files1 =f.listFiles();
        System.out.println(Arrays.toString(files1));


    }
}
